package cn.tedu.springmvc.demo;


import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class MyController {

    // @RequestMapping("/my01/test01.action")
    // public void test01(){
    //     System.out.println("Hello,SpringMVC~~~");
    // }

    @RequestMapping("/my01/test02.action")
    public ModelAndView test02(){
        ModelAndView mv=new ModelAndView();
        mv.addObject("k1","hello");
        mv.addObject("k2","SpringMVC~~~~");
        mv.setViewName("test02");
        return mv;
    }

}